package com.shuoyue.ycgk.ui.main.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseViewHolder;
import com.shuoyue.ycgk.R;
import com.shuoyue.ycgk.base.baseadapter.AppBaseQuickAdapter;

import java.util.List;

public class HomeButtonsAdapter extends AppBaseQuickAdapter<HomeButton> {

    public HomeButtonsAdapter(@Nullable List<HomeButton> data) {
        super(R.layout.item_home_button, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, HomeButton item) {
        helper.addOnClickListener(R.id.lay_all);
        helper.setImageResource(R.id.img, item.getSrc());
        helper.setText(R.id.title, item.getTitle());
    }
}
